home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / SAT 2.3b4 / Demo ƒ / Collision demo ƒ / Collision demos notes next >
Encoding:
Text File  |  1994-06-24  |  1.1 KB  |  15 lines  |  [TEXT/ttxt]

  1. Collision and Collision ][
  2. ==============================
  3.  
  4. The two Collision demos are almost as simple as SATminimal, but feature two sprite units and detects collisions. This makes them simple games rather than just demos, on the level for small kids.
  5.  
  6. Both demos feature "Mr Egghead" who is controlled with the mouse, who eats apples.
  7.  
  8. In Collision, all apples are "fresh". The apples detect collisions by inspecting their "kind" field.
  9.  
  10. In Collision ][, apples can be "fresh" or "rotten". Apples can get rotten when bouncing in a wall, and they always get rotten when colliding with other apples. If Mr Egghead eats a fresh apple, he is happy, but if he touches a rotten apple, he isn't that happy about it… Since we must detect collisions both between apples and between apples and Mr Egghead, a smarter collision detection scheme is used, using callback routines (hitTasks). This is done by the apples, in HitOtherSprite.
  11.  
  12. Collision ][ also demonstrates the use of SATPlotFace for modifying the background (by drawing apple cores in the background when Mr Egghead eats an apple).
  13.  
  14. Collision /// is a different matter. See its separate note.
  15.